import React, {Component} from 'react'
import {Link} from 'react-router'
import '../sass/Top'

export default class Top extends Component {
  constructor() {
    super()
  }

  render() {
    let {station, scanStation} = this.props

    return (
      <div className="home-top">
          <div className="left">
              <span className="home-logo">
                  <img src={require('../images/caishixian.png')} alt="彩食鲜"/>
              </span>
              <div className="home-location">
                  <i className="iconfont s2b-zuobiao"/>{station}
              </div>
          </div>
          <div className="right">
              <Link className="link" to="/search"><i className="iconfont s2b-sousuo"/></Link>
              <span onClick={scanStation.bind(this)}><i className="iconfont s2b-saoma"/></span>
          </div>
      </div>
    )
  }
}
